package com.cmc.cloud.cmclink.doc.vo.blnovo.sichangevo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * @author 周贤
 * @date 2025/10/3
 */
@Schema(description = "si 可更改的主信息  判断mcn cod 的依据字段")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlnoChangeVO {

    @Schema(description = "路径id")
    private Long routeId;

    @Schema(description = "接货地")
    private String porCode;

    @Schema(description = "装货港")
    private String polCode;

    @Schema(description = "卸货港")
    private String podCode;

    @Schema(description = "目的地")
    private String delCode;

    @Schema(description = "订舱船名")
    private String bkgVesselCode;

    @Schema(description = "订舱航次")
    private String bkgVoyage;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BlnoChangeVO)) {
            return false;
        }
        BlnoChangeVO that = (BlnoChangeVO) o;
        return Objects.equals(getRouteId(), that.getRouteId()) &&
                Objects.equals(getPorCode(), that.getPorCode()) &&
                Objects.equals(getPolCode(), that.getPolCode()) &&
                Objects.equals(getPodCode(), that.getPodCode()) &&
                Objects.equals(getDelCode(), that.getDelCode()) &&
                Objects.equals(getBkgVesselCode(), that.getBkgVesselCode()) &&
                Objects.equals(getBkgVoyage(), that.getBkgVoyage());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getRouteId(), getPorCode(), getPolCode(), getPodCode(), getDelCode(), getBkgVesselCode(), getBkgVoyage());
    }
}
